﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq.Expressions;
using IntelliLance.Math.Parser;

namespace IntelliLance.Math.Client
{
    class Program
    {
        static void Main(string[] args)
        {
            var parser = new MathParser(new SYATokenProcessor());
            parser.VariableDefinitions.Add("G", typeof(int));
            var queue = parser.Evaluate("+5 + -1 + @G");
            var transform = new ExpressionTransform(queue);
            var result = transform.TransformAndCompile();

            int G = 5;
            Console.WriteLine(result.DynamicInvoke(G));
        }


    }
}
